#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>



using namespace std;

int main()
{
	int T, n, a, b, res = 0;
	cin >> T;
	for (int i = 0; i < T; ++i)
	{
		res = 0;
		cin >> n >> a >> b;
		if (a / 2.0 > b / 3.0)
		{
			if (n >= 3)
			{
				res += n / 3 * b;
				n %= 3;
			}
			if (n != 0)
				res += a;
		}
		else
		{
			res += a * (n / 2);
		}

		cout << res << endl;

	}


	return 0;
}


int main1()
{
	int n, k, tmp, count = -1;
	cin >> n >> k;
	priority_queue<int, vector<int>, greater<int>> heap;
	for (int i = 0; i < n; ++i)
	{
		cin >> tmp;
		heap.emplace(tmp);
	}

	while (k > 0)
	{
		heap.emplace(heap.top() * 2);
		k -= heap.top();
		heap.pop();
		count++;
	}

	cout << count << endl;



	return 0;
}